export interface Config {
  server: ServerConfig
  db: DbConfig
  swagger: SwaggerConfig
  wechat: WechatConfig
  log: LogConfig
}

export interface ServerConfig {
  port: number
  cors: boolean
  scret: string
}

export interface DbConfig {
  protocol: string
  dbName: string
  port: number
  host: string
  userName: string
  password: string
  ssl: boolean
}

export interface SwaggerConfig {
  enabled: boolean
  title: string
  description: string
  version: string
  path: string
}

interface WX_GZH {
  appid: string
  appsecret: string
  token: string
}

interface WX_MP {
  appid: string
  appsecret: string
  token: string
}
export interface WechatConfig {
  gzh: WX_GZH
  mp: WX_MP
}
interface LogOpt {
  zipped: boolean // 是否对归档日志文件进行gzip
  maxSize: string // 日志文件大小。这可以是字节数，e.g. '1024k' or '5m' or '1g' (默认值是null)
  maxFiles: string // 最大日志保留数如果不设置，则不会删除任何日志。 e.g. '1d' or '5m' or '3h' (默认值是null)
}
export interface LogConfig {
  lvError: LogOpt
  lvInfo: LogOpt
}
